<?php use_helper('I18N') ?>
<form action="<?php echo url_for('@sf_guard_signin') ?>" class="yform columnar" method="post">
	<fieldset class="columnar">
		<?php foreach ($form as $widget) : ?>
			<?php if(!$widget->isHidden()) : ?>
				<?php
					switch (get_class($widget->getWidget())) {
						case 'sfWidgetFormInputCheckbox':
							echo '<div class="type-check">'.$widget->render().' <label>'.$widget->renderLabel().'</label></div>';
							break;

						default:
							echo '<div class="type-text"><label>'.$widget->renderLabel().'</label> '.$widget->render().'</div>';
							break;
					}
				?>
			<?php else : ?>
				<?php echo $widget->render(); ?>
			<?php endif; ?>
		<?php endforeach; ?>
	</fieldset>
	<div class="type-button">
		<input type="submit" value="<?php echo __('Signin', null, 'sf_guard') ?>" />

		<?php $routes = $sf_context->getRouting()->getRoutes() ?>
		<?php if (isset($routes['sf_guard_forgot_password'])): ?>
			<a href="<?php echo url_for('@sf_guard_forgot_password') ?>"><?php echo __('Forgot your password?', null, 'sf_guard') ?></a>
		<?php endif; ?>

		<?php if (isset($routes['sf_guard_register'])): ?>
			&nbsp; <a href="<?php echo url_for('@sf_guard_register') ?>"><?php echo __('Want to register?', null, 'sf_guard') ?></a>
		<?php endif; ?>
	</div>
</form>